/**
 * @description tabBar 分类
 */
import { request } from './index';

export const getCategory = () => {
    // 分类数据
    return request({
        url: '/api/index'
    });
}

/**
 * @description 商品列表
 * @param {*} Object category_id:分类id, type:排序类型, page:分页
 * @returns 
 */
export const getCategoryGoods = ({ category_id, type = 'sales', page = 1 }) => {
    return request({
        url: `/api/goods?category_id=${category_id}&${type}=1&page=${page}`
    })
}